[Helm] Fix: inject flag-based env into ConfigMap when configuration.enabled=true#4270
[Helm] Fix: inject flag-based env into ConfigMap when configuration.enabled=true#4270rueian merged 6 commits intoray-project:masterfrom
Conversation
…s enabled Signed-off-by: win5923 <ken89@kimo.com>
8c2c7e6 to
418d799
Compare
seanlaii
left a comment
There was a problem hiding this comment.
Thanks! Overall this looks great to me.
Aside from the comment below, I have one minor suggestion: should we consider avoiding setting this flag?
I think both are fine, This flag is primarily designed for complex structures that cannot be easily passed via command-line flags (like defaultContainerEnvs, headSidecarContainers). |
Signed-off-by: win5923 <ken89@kimo.com>
Sorry for the confusion. What I mean is should we consider avoiding setting the |
Oh, Thanks for catching this. I think we should consider avoiding setting the command line flags when they enable the config map mode. |
Signed-off-by: win5923 <ken89@kimo.com>
| {{- end -}} | ||
| {{- end -}} | ||
| {{- end -}} | ||
| {{- $argList = append $argList (include "kuberay.featureGates" . | trim) -}} |
There was a problem hiding this comment.
Thanks! To confirm, featureGates is not supported in config map, is it correct?
There was a problem hiding this comment.
cc @troychiu @fsNick @machichima to help review.
plz provide screenshot if possible, thank you!
Signed-off-by: win5923 <ken89@kimo.com>
Future-Outlier
left a comment
There was a problem hiding this comment.
high level looks good to me, trust @seanlaii and @machichima 's review
Why are these changes needed?
Check #4268 (comment)
Some helm values, e.g. leaderElectionEnabled and EnableMetrics, are passed as flags, see here:
kuberay/helm-chart/kuberay-operator/templates/deployment.yaml
Lines 126 to 130 in 9e8a2c0
Then these flags get ignored when
configuration.enabled=true, see here:kuberay/ray-operator/main.go
Lines 117 to 141 in 9e8a2c0
kuberay/helm-chart/kuberay-operator/values.yaml
Lines 104 to 107 in 9e8a2c0
kuberay/helm-chart/kuberay-operator/templates/deployment.yaml
Lines 86 to 91 in 9e8a2c0
kuberay/helm-chart/kuberay-operator/templates/configmap.yaml
Lines 1 to 20 in 9e8a2c0
This PR includes all flag-based configuration options in the ConfigMap template, ensuring they are properly read from helm values and injected into the ConfigMap.
When
configuration.enabled = true, the KubeRay Operator would read all flag-based envs from the ConfigMap, and these values would take precedence over the flag-based configuration.When
configuration.enabled = falseand the relevant flag-based options are explicitly set in values.yaml (e.g. metrics.enabled = true), the operator would preserving the current flag-based behavior.Result:

Related issue number
Closes #4268
Checks